export function random_string(len = 32) {
  let chars = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678";
  let maxPos = chars.length;
  let pwd = "";
  for (let i = 0; i < len; i++) {
    pwd += chars.charAt(Math.floor(Math.random() * maxPos));
  }
  return pwd;
}

export function parseToDOM(str) {
  var div = document.createElement("div");
  if (typeof str == "string") div.innerHTML = str;
  return div.childNodes;
}

